Add invidious fallback for likes#4464
Add invidious fallback for likes#4464MitchelPaulin wants to merge 2 commits intoFreeTubeApp:developmentfrom
Conversation
|
Thanks for looking into this & writing something up! suggestion (blocking): Check question: Does this ever happen the other way around, where we would need to add the corresponding Local API fallback logic if Invidious fails? Or is this a weird bug specific to the Local API? If it is a weird bug with the Local API, is this bandaid really getting at the problem? I feel like I might have been seeing this recently as well, although I can't exactly remember. If anyone can replicate this occurring and/or show this fallback in action (with non-mocked data), that would be nice for testing it. |
|
I would rather have my YouTube.js pull request merged that parses YouTube's new layout, as that's the proper fix and how we usually fix the local API, instead of adding an extra request to Invidious for every single video that you watch. |
That would be preferable for sure. Could you link it? I was taking a look at youtubei.js and couldn't see any open issue or PR addressing this, unless youtube.js is something else |
|
Oh it's a PR for freetube not to youtbei.js https://github.com/FreeTubeApp/FreeTube/pull/4370/files. I guess this is fixed in 8.0.0. I guess my only question then is error handling. In the case we can't find something like likes, should that throw and fall into the invidious logic? Seems like that would be better rather than having missing info like it currently does |
I'm sorry for not linking it, I assumed that the name of it made it rather obvious. |
Pull request was closed
Add invidious fallback for likes
Pull Request Type
Description
youtubei.js is just not returning video likes for me, this however is not treated as an error, so I was just getting likes of 0. Invidious however was giving me video likes. I added a fallback where if the likes are not found I ask Invidious for them. I also moved the fetch likes code to the bottom of the try/catch in case something else above throws, since this would also fetch likes from invidious, so it avoids having to make two fetches.
I also removed any reference to youtube dislikes form the file since its no longer relevant
Desktop
Additional context
Is anyone else having issues with the likes not loading on any videos? Maybe youtube is trying to block likes for people that are not logged in? I've attempted to update youtubei and tried with/without my VPN and its always undefined. If this is just a me issue it might not be worth merging.